Patent Document 1 discloses a controller for a multi-phase rotating machine, which is configured as follows. In case either the first inverter or the second inverter suffers from short-circuiting, all the MOSFETs in the failed system are turned OFF to stop the failed system from driving the motor, and the MOSFETs in the system that is normally operating are controlled so as to cancel out the braking torque generated in the failed system.